const Joi = require('joi')  //定义验证规则

// 定义验证规则


     const nickname=Joi.string().min(3).max(12).required()
     const password=Joi.string().pattern(/^[\S]{4,16}/)
     const repassword=Joi.ref('password')
     const agreement=Joi.required()
     const confirm=Joi.required()
     const email=Joi.required()
     const gender=Joi.required()
     const phone=Joi.required()
     const prefix=Joi.required()
    


exports.rules={
    body:{
        nickname,
        password,
        agreement,
confirm,
email,
gender,
phone ,
prefix,
    },
    query:{

    },
    params:{

    }
}